Functions


Functions Summary
string

cot_build_extrafields(string name, array extrafield, string data)

Returns Extra fields edit fields

string

cot_build_extrafields_data(string name, array extrafield, string value, string parser)

Returns Extra fields data

private string

cot_default_html_construction(string type)

Extra fields - Return default base html-construction for various types of fields (without value= and name=)

bool

cot_extrafield_add(string location, string name, string type, string html, string variants, string default, bool required, string parse, string description, string params, string enabled, bool noalter, string customtype)

Add extra field for pages

void

cot_extrafield_movefiles()

Moves and unset files in the $uploadfiles array

bool

cot_extrafield_remove(string location, string name)

Delete extra field

string

cot_extrafield_title(array extrafield, string titlePrefix)

Extrafield title

void

cot_extrafield_unlinkfiles(string fielddata, array extrafields, mixed extrafield)

Delete files in extrafield array

bool

cot_extrafield_update(string location, string oldname, string name, string html, string variants, string default, bool required, string parse, string description, string params, string enabled, string customtype, mixed type)

Update extra field for pages

void

cot_extrafields_register_table(string table_name)

Registers a table in extrafields registry

string

cot_import_extrafields(string inputname, string source, string oldvalue, string titlePrefix, mixed extrafield)

Imports Extra fields data

array

cot_import_filesarray(array file_post)

Fixes the indexing of multiple file uploads from the format: $_FILES['field']['key']['index'] To the more standard and appropriate: $array['index']['key']

void

cot_load_extrafields(bool forcibly)

Loads extrafields data into global

Function Detail

system\extrafields.php at line 23

cot_build_extrafields

public string cot_build_extrafields(string name, array extrafield, string data)
Returns Extra fields edit fields
Parameters:
name - Variable name
extrafield - Extra fields data
data - Existing data for fields
Returns:

system\extrafields.php at line 435

cot_build_extrafields_data

public string cot_build_extrafields_data(string name, array extrafield, string value, string parser)
Returns Extra fields data
Parameters:
name - Lang row
extrafield - Extra fields data
value - Existing user value
parser - Non-default parser to use
Returns:

system\extrafields.php at line 509

cot_default_html_construction

private string cot_default_html_construction(string type)
Extra fields - Return default base html-construction for various types of fields (without value= and name=)
Parameters:
type - Type of field (input, textarea etc)
Returns:

system\extrafields.php at line 589

cot_extrafield_add

public bool cot_extrafield_add(string location, string name, string type, string html, string variants, string default, bool required, string parse, string description, string params, string enabled, bool noalter, string customtype)
Add extra field for pages
Parameters:
location - Table for adding extrafield
name - Field name (unique)
type - Field type (input, textarea etc)
html - HTML Resource string
variants - Variants of values (for radiobuttons, selectors etc)
default - Default value
required - Required field
parse - Parsing Type (HTML, BBCodes)
description - Description of field (optional, for admin)
params - Params (for radiobuttons, selectors etc)
enabled - Enable field
noalter - Do not ALTER the table, just register the extra field
customtype - Modify sql type, size, default
Returns:
Global:
CotDB $db

system\extrafields.php at line 880

cot_extrafield_movefiles

public void cot_extrafield_movefiles()
Moves and unset files in the $uploadfiles array

system\extrafields.php at line 808

cot_extrafield_remove

public bool cot_extrafield_remove(string location, string name)
Delete extra field
Parameters:
location - Table contains extrafield
name - Name of extra field
Returns:
Global:
CotDB $db

system\extrafields.php at line 405

cot_extrafield_title

public string cot_extrafield_title(array extrafield, string titlePrefix)
Extrafield title
Returns:

system\extrafields.php at line 910

cot_extrafield_unlinkfiles

public void cot_extrafield_unlinkfiles(string fielddata, array extrafields, mixed extrafield)
Delete files in extrafield array
Parameters:
fielddata - field data
extrafields - Extra fields data

system\extrafields.php at line 704

cot_extrafield_update

public bool cot_extrafield_update(string location, string oldname, string name, string html, string variants, string default, bool required, string parse, string description, string params, string enabled, string customtype, mixed type)
Update extra field for pages
Parameters:
location - Table contains extrafield
oldname - Exist name of field
name - Field name (unique)
html - HTML Resource string
variants - Variants of values (for radiobuttons, selectors etc)
default - Default value
required - Required field
parse - Parsing Type (HTML, BBCodes)
html - HTML Resource string
variants - Variants of values (for radiobuttons, selectors etc)
description - Description of field (optional, for admin)
params - Params (for radiobuttons, selectors etc)
enabled - Enable field
customtype - Modify sql type, size, default
Returns:
Global:
CotDB $db

system\extrafields.php at line 839

cot_extrafields_register_table

public void cot_extrafields_register_table(string table_name)
Registers a table in extrafields registry
Parameters:
table_name - Unprefixed table name

system\extrafields.php at line 155

cot_import_extrafields

public string cot_import_extrafields(string inputname, string source, string oldvalue, string titlePrefix, mixed extrafield)
Imports Extra fields data
Parameters:
inputname - Variable name (or value for source=D)
source - Source type: G (GET), P (POST), C (COOKIE) or D (variable filtering)
oldvalue - Old value of extrafield
Returns:

system\extrafields.php at line 858

cot_import_filesarray

public array cot_import_filesarray(array file_post)
Fixes the indexing of multiple file uploads from the format: $_FILES['field']['key']['index'] To the more standard and appropriate: $array['index']['key']
Parameters:
file_post - $_FILE array
Returns:

system\extrafields.php at line 937

cot_load_extrafields

public void cot_load_extrafields(bool forcibly)
Loads extrafields data into global
Parameters:
forcibly - Forcibly reload exflds
Global:
array $cot_extrafields
CotDB $db
Cache $cache